package view;

import java.awt.Dimension;
import java.awt.Font;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class PlayerPanel extends JPanel {
	//JPanel pour chaque ligne de joueur
	
		private Font font = new Font("Verdana",Font.BOLD, 12);
		private JTextField inputName ;
		public PlayerPanel(String path,int i){
			Icon icon = new ImageIcon(path);
			String text = "Joueur " + i;
			JLabel lblue = new JLabel(text, icon, JLabel.CENTER);
			lblue.setFont(font);
			inputName = new JTextField();
			inputName.setPreferredSize(new Dimension(230,30));
			this.add(lblue);
			this.add(inputName);

		}
		public String getName(){
			return this.inputName.getText();
		}
	
}
